With increased hardware processing capability, sophisticated video graphics are increasingly possible in applications such as video streaming or video gaming. In a typical hardware system that supports graphics, applications are executed by a conventional central processing unit (CPU), which may require calls for rendering graphic objects on a display. In order to efficiently process the display of such graphics, specialized processors termed graphic processing units (GPU) have been employed to render graphics. A GPU is a specialized processing circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display. Typical GPUs perform various graphic processing functions by performing calculations related to 3D graphics. These include accelerating memory-intensive work such as texture mapping and rendering polygons, and performing geometric calculations such as the rotation and translation of vertices into different coordinate systems. GPUs may also support programmable shaders, which can manipulate vertices and textures, oversampling and interpolation techniques to reduce aliasing, and provide very high-precision color spaces.
Currently, applications such as state-of-the-art video games require high resolution and detailed graphics presented in real-time. In real-time graphics, shading is a method of taking a desired graphic object, which is usually a collection of triangles formed from vertices and textures, then rendering the object onto an image by assigning shading to the triangles of the object, resulting in a colored image for a video frame. Most video games perform shading by employing either forward rendering or deferred rendering methods.
In forward rendering, each object is drawn one by one. The triangles of the objects are processed and then drawn onto the screen in the order they were submitted. For each pixel element of the triangle, a pixel program (or fragment program) is executed, which evaluates the color for that pixel on the screen. The image created is an approximate color value of what will be presented to the user, resembling in format and style a computer representation of a photograph.
In deferred rendering, rather than each object rendering a color into an image, shading parameters are rendered into a deep image that is a series of images that may contain more data than just a color. Shading parameters might include factors such as a normal direction, an albedo color, or a specular color and power. Once the deep image is created, another series of shader programs operates on the deep image and transforms it into an image. This approach decouples shading from rasterization, shading the final image buffer based on the shading parameters.
Both of these known approaches have drawbacks. Forward rendering may make local shading evaluation more computationally expensive, since small localized effects might need to be applied to large areas of a scene. Deferred renders are notorious for the ability to have a limited number of materials and suffer intrinsic limitations in regards to anti-aliasing. Both approaches also suffer from shader aliasing. Shader aliasing renders artifacts (mistakes) made because the shader program has logic that can alias. This can be partially explained mathematically by realizing that while equation (1) should be used to perform shading operations (or an approximation thereof), in fact equation (2) is used.Color(P)=∫RS(ShadeInputs(t))dt  (1)Color(P)=S(∫RShadeInputs(t)dt)  (2)
In these equations, the Color is the resulting color, P is the pixel on the screen, S is the shading program, the “ShadeInputs” are the input parameters for the shading program, and R is the region of mesh that maps to the P. These equations are only equivalent when the program S is linear, a property that few shading programs have.
Further, in both forward and deferred renders, the parameters for shading are calculated every frame via rasterizing the shading inputs. The parameter results are locked into textures by using texture coordinates that are interpolated from vertices of the triangle. This is usually done by determining the equivalent barycentric coordinates of the center point of each pixel the triangle covers. Because the vertices of the triangle do not map directly to the center of a pixel, for each frame the barycentric coordinates may vary by a small value, even though the pixels that are covered by the triangle remain the same. This means there is very little cohesion from frame to frame of the exact shading inputs used and therefore may produce wildly different results causing aliasing effects. This may also cause undesirable artifacts to be displayed.
Thus, there is a need for a more efficient method to render graphic objects that separates shading from rasterization. There is a further need for a rendering method that allows objects to be efficiently filtered for different sizing. There is further need for a rendering method that may be used to provide frames of objects with minimal aliasing. There is a further need for a rendering method incorporating precalculated shading data to cause blurring effects in a produced frame.